﻿// -------------------------------------------------------------------------
//    @FileName         :    NFChatPart.cpp
//    @Author           :    gaoyi
//    @Date             :    24-8-30
//    @Email            :    445267987@qq.com
//    @Module           :    NFChatPart
//
// -------------------------------------------------------------------------

#include "NFChatPart.h"

#include "proto_db.pb.h"

NFChatPart::NFChatPart()
{
    if (EN_OBJ_MODE_INIT == NFShmMgr::Instance()->GetCreateMode())
    {
        CreateInit();
    }
    else
    {
        ResumeInit();
    }
}

NFChatPart::~NFChatPart()
{
}

int NFChatPart::CreateInit()
{
    return 0;
}
    
int NFChatPart::ResumeInit()
{
    return 0;
}

int NFChatPart::LoadFromDB(const proto_ff::tbRoleDetail *pDBData)
{
    m_stData.FromPb(pDBData->role_other_data().chat_data());
    return 0;
}

int NFChatPart::InitConfig(proto_ff::tbRoleDetail *pDbData, const RoleOne &stRoleOne)
{
    pDbData->mutable_role_other_data()->mutable_chat_data();
    return 0;
}

int NFChatPart::SaveDB(proto_ff::tbRoleDetail *pDBData)
{
    m_stData.ToPb(pDBData->mutable_role_other_data()->mutable_chat_data());
    return 0;
}

int NFChatPart::MakePlayerDataCS(proto_ff::Proto_CSGetRoleRsp* pCSGetRoleRsp)
{
    return 0;
}

int NFChatPart::MakeCityPlayerData(proto_ff::CityRoleInfo* pGCCityRoleInfo)
{
    return 0;
}
